﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Pysics2D;
namespace Pysics2DTest_Symple
{
    class Program
    {
        static void Main(string[] args)
        {
            Pysics2D.Environment.Meter = 1;
            Pysics2D.Environment.Second = 1;
            Masspoint mass = new Masspoint(10);
            Speed speed = new Speed();
            Force force = new Force(0,1);
            Console.Write("请输入质点的质量:");
            mass.M = (float)Convert.ToDouble(Console.ReadLine());
            Console.Write("请输入质点的水平速度：");
            speed.X= (float)Convert.ToDouble(Console.ReadLine());
            Console.Write("请输入质点的竖直速度：");
            speed.Y = (float)Convert.ToDouble(Console.ReadLine());
            mass.Speed = speed;
            Console.Write("请输入质点受到的力的方向，水平-1 垂直-2:");
            force.Direction= Convert.ToInt32(Console.ReadLine());
            Console.Write("请输入质点受到的力的大小:");
            force.Value = Convert.ToInt32(Console.ReadLine());
            mass.AddForce(force);
            Console.WriteLine("按回车计算质点的下一个状态");
            while (true)
            {
                Console.ReadLine();
                Console.WriteLine("质点位置：{0},{1}",mass.Location.X,mass.Location.Y);
                mass.Next();
            }
        }
    }
}
